package cn.iocoder.yudao.module.trade.job.order;

import cn.iocoder.yudao.framework.quartz.core.handler.JobHandler;
import cn.iocoder.yudao.framework.tenant.core.job.TenantJob;
import cn.iocoder.yudao.module.trade.service.order.TradeOrderQueryService;
import cn.iocoder.yudao.module.trade.service.order.TradeOrderUpdateService;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

/**
 * 门店销售额统计 Job
 *
 * @author 万民匠心
 */
@Component
public class ShopSalesAmountJob implements JobHandler {

    @Resource
    private TradeOrderQueryService tradeOrderQueryService;

    @Override
    @TenantJob
    public String execute(String param) {
        Integer count = tradeOrderQueryService.calculateShopSalesAmount(param);
        return String.format("门店销售额统计 %s 个", count);
    }

}
